package org.os.framework.document.swagger.entity;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;

/**
 * 配置参数
 * 
 * @author
 */
@Data
@ConfigurationProperties(prefix = "spring.document.swagger")
@Configuration
public class SwaggerProps implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 文档标题
     */
    private String title = "API 文档";

    /**
     * 文档描述
     */
    private String description = "api文档";

    /**
     * 联系人
     */
    @JsonIgnore
    private Contact contact;

    /**
     * 服务条款
     */
    private String termsOfServiceUrl;

    /**
     * 许可证
     */
    private String license;

    /**
     * 许可证URL
     */
    private String licenseUrl;

    /**
     * 版本号
     */
    private String version = "0.0.1";

    /**
     * 正则表达式排除指定资源
     */
    private String excludeRegex = "/error.*";

    /**
     * token字段名
     */
    private String requestHandlerTokenField = "Authorization";

    /**
     * token字段描述
     */
    private String requestHandlerTokenDescription = "Bearer token";

    /**
     * token字段类型
     */
    private String requestHandlerTokenType = "string";

    /**
     * token字段参数类型
     */
    private String requestHandlerTokenParameterType = "header";

    /**
     * 带token请求路径过滤
     */
    private List<HandlerFilter> requestHandlerTokenFilter = Collections.emptyList();
}
